/**
 * 数组分页
 * @param {*} pageSize 每页条数
 * @param {*} currentPage  当前页
 * @param {*} arr 数组源
 */
export function pagination (pageSize, currentPage, arr) {
  var skipNum = (currentPage - 1) * pageSize
  var newArr = (skipNum + pageSize >= arr.length) ? arr.slice(skipNum, arr.length) : arr.slice(skipNum, skipNum + pageSize)
  return newArr
}
